if __name__ == '__main__':
    Qstr = input()
    Qlist = [int(i) for i in list(Qstr)]
    Qnum = int(Qstr)
    for i in range(10,100):
        if i*Qlist[0]>99:
            continue
        if i*Qlist[2]<100:
            continue
        if Qnum*i+1>9999:
            continue
        print(f"{Qnum*i+1} {i}")
    